3.2.88 \(\int \frac {A+B x}{(a+b x)^2} \, dx\) [188]

Optimal. Leaf size=32 \[ -\frac {A b-a B}{b^2 (a+b x)}+\frac {B \log (a+b x)}{b^2} \]

[Out]

(-A*b+B*a)/b^2/(b*x+a)+B*ln(b*x+a)/b^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {45} \begin {gather*} \frac {B \log (a+b x)}{b^2}-\frac {A b-a B}{b^2 (a+b x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(a + b*x)^2,x]

[Out]

-((A*b - a*B)/(b^2*(a + b*x))) + (B*Log[a + b*x])/b^2

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {A+B x}{(a+b x)^2} \, dx &=\int \left (\frac {A b-a B}{b (a+b x)^2}+\frac {B}{b (a+b x)}\right ) \, dx\\ &=-\frac {A b-a B}{b^2 (a+b x)}+\frac {B \log (a+b x)}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 31, normalized size = 0.97 \begin {gather*} \frac {-A b+a B}{b^2 (a+b x)}+\frac {B \log (a+b x)}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(a + b*x)^2,x]

[Out]

(-(A*b) + a*B)/(b^2*(a + b*x)) + (B*Log[a + b*x])/b^2

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 33, normalized size = 1.03

method result size
default \(\frac {B \ln \left (b x +a \right )}{b^{2}}-\frac {A b -B a}{b^{2} \left (b x +a \right )}\) \(33\)
norman \(\frac {B \ln \left (b x +a \right )}{b^{2}}-\frac {A b -B a}{b^{2} \left (b x +a \right )}\) \(33\)
risch \(\frac {B \ln \left (b x +a \right )}{b^{2}}-\frac {A}{b \left (b x +a \right )}+\frac {B a}{b^{2} \left (b x +a \right )}\) \(39\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

B*ln(b*x+a)/b^2-1/b^2*(A*b-B*a)/(b*x+a)

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 34, normalized size = 1.06 \begin {gather*} \frac {B a - A b}{b^{3} x + a b^{2}} + \frac {B \log \left (b x + a\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)^2,x, algorithm="maxima")

[Out]

(B*a - A*b)/(b^3*x + a*b^2) + B*log(b*x + a)/b^2

________________________________________________________________________________________

Fricas [A]
time = 1.55, size = 37, normalized size = 1.16 \begin {gather*} \frac {B a - A b + {\left (B b x + B a\right )} \log \left (b x + a\right )}{b^{3} x + a b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)^2,x, algorithm="fricas")

[Out]

(B*a - A*b + (B*b*x + B*a)*log(b*x + a))/(b^3*x + a*b^2)

________________________________________________________________________________________

Sympy [A]
time = 0.09, size = 27, normalized size = 0.84 \begin {gather*} \frac {B \log {\left (a + b x \right )}}{b^{2}} + \frac {- A b + B a}{a b^{2} + b^{3} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)**2,x)

[Out]

B*log(a + b*x)/b**2 + (-A*b + B*a)/(a*b**2 + b**3*x)

________________________________________________________________________________________

Giac [A]
time = 1.31, size = 57, normalized size = 1.78 \begin {gather*} -\frac {B {\left (\frac {\log \left (\frac {{\left | b x + a \right |}}{{\left (b x + a\right )}^{2} {\left | b \right |}}\right )}{b} - \frac {a}{{\left (b x + a\right )} b}\right )}}{b} - \frac {A}{{\left (b x + a\right )} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)^2,x, algorithm="giac")

[Out]

-B*(log(abs(b*x + a)/((b*x + a)^2*abs(b)))/b - a/((b*x + a)*b))/b - A/((b*x + a)*b)

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 32, normalized size = 1.00 \begin {gather*} \frac {B\,\ln \left (a+b\,x\right )}{b^2}-\frac {A\,b-B\,a}{b^2\,\left (a+b\,x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(a + b*x)^2,x)

[Out]

(B*log(a + b*x))/b^2 - (A*b - B*a)/(b^2*(a + b*x))

________________________________________________________________________________________